<script>
  // yolo
  function toggleAllDetails(node) {
    var rows = document.querySelectorAll("tr.details-row");

    if (node.innerHTML === "(expand all)") {
      node.innerHTML = "(collapse all)";

      for (var x = 0; x < rows.length; x++) {
        var row = rows[x];
        row.className = "details-row";
      }
    } else {
      node.innerHTML = "(expand all)";

      for (var x = 0; x < rows.length; x++) {
        var row = rows[x];
        row.className = "details-row hidden";
      }
    }
  }

  function toggleDetails(node) {
    var parentRow = node.parentNode.parentNode;
    var detailsRow = parentRow.nextSibling;

    if (detailsRow.className === "details-row hidden") {
      detailsRow.className = "details-row";
    } else {
      detailsRow.className = "details-row hidden";
    }
  }
</script>
